package eu.pago.chat.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.rmi.registry.Registry;

import javax.swing.JFrame;

public class InitSignUpListener implements ActionListener {

	private final LoginFrame frame;
	private final Registry registry;

	public InitSignUpListener(LoginFrame loginFrame, Registry registry) {
		this.frame = loginFrame;
		this.registry = registry;
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		JFrame signUpFrame = new SignUpFrame(registry);
		// IServer serverCentral;
		// List<InfoFriend> friends = null;
		// try {
		// serverCentral = (IServer) registry.lookup("Server");
		// friends = serverCentral.addUser(username, "");
		// } catch (RemoteException | NotBoundException exc) {
		// // TODO Auto-generated catch block
		// exc.printStackTrace();
		// }
		//
		// @SuppressWarnings("unused")
		// JFrame friendsFrame = new FriendsFrame(friends);
		frame.dispose();
	}

}
